<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>em</title>
  <style>
    #demo1{
      width: 400px;
      height: 400px;
      background-color: skyblue;
      font-size: 40px;
    }
    #demo2{
      width: 5em;
      height: 5em;
      background-color: gray;
    }
  </style>
</head>
<body>
  <!-- em 参考其父级元素的字体大小 1 em = 1 父级元素的font-size -->
  <div id="demo1">
    <div id="demo2"></div>
  </div>
</body>
</html>